import { MockMethod } from 'vite-plugin-mock'

const userList = {
  data: [{
    updateBy: '孙学起',
    updateTime: '2020-03-20 05:41:48',
    deleteStatus: '0',
    deleteBy: '3123',
    deleteTime: '2020-09-13 06:10:18',
    createTime: '2020-03-20 05:30:27',
    id: '160000965529609',
    username: 'test',
    nickname: '一处荒烟',
    phone: '1435622563',
    email: '1090650726@qq.com',
    gender: '1',
    status: '1',
    admin: true
  }, {
    updateBy: '3123',
    updateTime: '2020-03-20 05:41:48',
    deleteStatus: '0',
    deleteBy: '孙学起',
    deleteTime: '2020-09-13 06:10:18',
    createTime: '2019-04-14 08:15:42',
    id: '160000924600483',
    username: 'LuuWong',
    nickname: '王璐璐',
    phone: '1435622563',
    email: '3520120@qq.com',
    gender: '0',
    status: '1',
    admin: false
  }, {
    updateBy: '3123',
    updateTime: '2020-03-20 05:41:48',
    deleteStatus: '0',
    deleteBy: '孙学起',
    deleteTime: '2020-09-13 06:10:18',
    createTime: '2019-04-14 08:15:42',
    id: '160000924600562',
    username: 'mary0503',
    nickname: 'Mary',
    phone: '13523635632',
    email: '652365@163.com',
    gender: '0',
    status: '1',
    admin: false
  }, {
    updateBy: '3123',
    updateTime: '2020-03-20 05:41:48',
    deleteStatus: '0',
    deleteBy: '孙学起',
    deleteTime: '2020-09-13 06:10:18',
    createTime: '2019-04-14 08:15:42',
    id: '160000924600556',
    username: 'Tom663',
    nickname: 'RealLove',
    phone: '1435622563',
    email: 'lulu@qq.com',
    gender: '1',
    status: '1',
    admin: false
  }, {
    updateBy: '3123',
    updateTime: '2020-03-20 05:41:48',
    deleteStatus: '0',
    deleteBy: '孙学起',
    deleteTime: '2020-09-13 06:10:18',
    createTime: '2019-04-14 08:15:42',
    id: '160000924600456',
    username: 'mapc',
    nickname: '明天看看',
    phone: '15262354526',
    email: '3520120@qq.com',
    gender: '0',
    status: '0',
    admin: false
  }, {
    updateBy: '3123',
    updateTime: '2020-03-20 05:41:48',
    deleteStatus: '0',
    deleteBy: '孙学起',
    deleteTime: '2020-09-13 06:10:18',
    createTime: '2019-04-14 08:15:42',
    id: '160000924600410',
    username: 'jack1254',
    nickname: 'Jack',
    phone: '18436236653',
    email: '33mgm4@gmail.com',
    gender: '1',
    status: '1',
    admin: false
  }]
}

export default [
  {
    url: '/mock/system/user/list',
    method: 'get',
    response: ({ query }) => {
      console.log("qqq", query)
      return {
        code: 200,
        data: userList.data,
        total: 35,
        message: ''
      }
      // return {
      //   code: 5001,
      //   message: '用户不存在'
      // }
    }
  }
] as MockMethod[]